package icu.qx.qc.feign;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import icu.qx.qc.domain.gbs.GbsGood;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Component
@FeignClient(value = "yyj-mes-gbs", contextId = "gbsGoodService1")
public interface GbsGoodService {
    /**
     * 修改物品 通过 is_material 区分物料和产品
     */
    @PutMapping("/gbs/good/route")
    public AjaxResult editRoute(@RequestBody List<GbsGood> gbsGoods);

    /**
     * 获取物品 通过 is_material 区分物料和产品详细信息
     */
    @GetMapping(value = "/gbs/good/route/{pdCode}")
    public R<List<GbsGood>> getInfoByRoute(@PathVariable("pdCode") String routeCode);

    /**
     * 获取物品 通过 is_material 区分物料和产品详细信息
     */
    @GetMapping(value = "/gbs/good/{pdCode}")
    public AjaxResult getInfo(@PathVariable("pdCode") String pdCode);
}
